//
//  CLpeopleViewController.m
//  I-want-go
//
//  Created by dllo on 15/10/29.
//  Copyright (c) 2015年 lanou3g. All rights reserved.
//

#import "CLpeopleViewController.h"
//#import "BaseModel.h"
//#import "CLtool.h"
//#import "CLdisgnerPeople.h"
//#import "CLpeopleTableCell.h"
//#import "CLinterViewController.h"
//#import "CLdisgner.h"
//#import "CLscreen.h"

@interface CLpeopleViewController ()
//<UITableViewDataSource, UITableViewDelegate>

//@property(nonatomic, retain)UITableView *myTableView;
//@property(nonatomic, retain)UIView *myView;
//@property(nonatomic, retain)UIImageView *phoneImage;
//@property(nonatomic, retain)UILabel *funsLabel;
//@property(nonatomic, retain)UILabel *seeLabel;
//@property(nonatomic, retain)UILabel *underLabel;
//
//@property(nonatomic, retain)NSMutableArray *arr;
//@property(nonatomic, retain)NSMutableDictionary *dicMo;
//@property(nonatomic, retain)NSDate *data;
//
@end

@implementation CLpeopleViewController


//- (void)dealloc {
//    [_dicMo release];
//    [_data release];
//    [_arr release];
//    [_underLabel release];
//    [_funsLabel release];
//    [_seeLabel release];
//    [_phoneImage release];
//    [_myView release];
//    [_myTableView release];
//    [super dealloc];
//}

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    
    
//    self.myTableView = [[UITableView alloc] initWithFrame:CGRectMake(0, 0, 375 * SWIDTH, 603 * SHEIGHT)];
//    [self.view addSubview:self.myTableView];
//    [_myTableView release];
//    self.myTableView.separatorStyle = UITableViewCellSeparatorStyleNone;
//    self.myTableView.dataSource = self;
//    self.myTableView.delegate = self;
//    self.myTableView.rowHeight = 160 * SHEIGHT;
//    self.myView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 375 * SWIDTH, 250 * SHEIGHT)];
//    self.myView.backgroundColor = [UIColor blackColor];
//    self.myTableView.tableHeaderView = self.myView;
//    [_myView release];
//    
//    self.phoneImage = [[UIImageView alloc] initWithFrame:CGRectMake(150 * SWIDTH, 20 * SHEIGHT, 75 * SWIDTH, 75 * SHEIGHT)];
//    [self.myView addSubview:self.phoneImage];
//    [_phoneImage release];
//    
//    
//    self.underLabel = [[UILabel alloc] initWithFrame:CGRectMake(50 * SWIDTH, 130 * SHEIGHT, 275 * SWIDTH, 30 * SHEIGHT)];
//    self.underLabel.backgroundColor = [UIColor blackColor];
//    self.underLabel.textColor = [UIColor cyanColor];
//    [self.myView addSubview:self.underLabel];
//    self.underLabel.numberOfLines = 0;
//    self.underLabel.font = [UIFont systemFontOfSize:13];
//    [_underLabel release];
//    
//    self.funsLabel = [[UILabel alloc] initWithFrame:CGRectMake(0, 170 * SHEIGHT, 187 * SWIDTH, 20 * SHEIGHT)];
//    self.funsLabel.backgroundColor = [UIColor blackColor];
//    self.funsLabel.textAlignment = NSTextAlignmentCenter;
//    self.funsLabel.textColor = [UIColor whiteColor];
//    [self.myView addSubview:self.funsLabel];
//    [_funsLabel release];
//    
//    self.seeLabel = [[UILabel alloc] initWithFrame:CGRectMake(187 * SWIDTH, 170 * SHEIGHT, 187 * SWIDTH, 20 * SHEIGHT)];
//    self.seeLabel.backgroundColor = [UIColor blackColor];
//    self.seeLabel.textAlignment = NSTextAlignmentCenter;
//    self.seeLabel.textColor = [UIColor whiteColor];
//    [self.myView addSubview:self.seeLabel];
//    [_seeLabel release];
//    
//    UIView *leftView = [[UIView alloc] initWithFrame:CGRectMake(50 * SWIDTH, 230 * SHEIGHT, 80 * SWIDTH, 1 * SHEIGHT)];
//    [self.myView addSubview:leftView];
//    leftView.backgroundColor = [UIColor whiteColor];
//    [leftView release];
//    
//    UIView *rightView = [[UIView alloc] initWithFrame:CGRectMake(240 * SWIDTH, 230 * SHEIGHT, 80 * SWIDTH, 1 * SHEIGHT)];
//    [self.myView addSubview:rightView];
//    rightView.backgroundColor = [UIColor whiteColor];
//    [rightView release];
//    
//    UILabel *fenLabel = [[UILabel alloc] initWithFrame:CGRectMake(140 * SWIDTH, 220 * SHEIGHT, 80 * SWIDTH, 20 * SHEIGHT)];
//    fenLabel.text = @"分享商品";
//    fenLabel.textAlignment = NSTextAlignmentCenter;
//    fenLabel.textColor = [UIColor whiteColor];
//    [self.myView addSubview:fenLabel];
//    [fenLabel release];
//    
////
//    [self createData];
    
}

//- (void)createData {
//    
//    self.data = [NSDate date];
//    NSLog(@"now date is: %@", self.data);
//    NSTimeInterval date = [self.data timeIntervalSince1970]*1000;
//   
//    NSString *timeSp = [NSString stringWithFormat:@"%ld", (long)date];
//    NSLog(@"%@", timeSp);
//    //    NSTimeZone *zone = [NSTimeZone systemTimeZone];
////    NSInteger interval = [zone secondsFromGMTForDate:self.data];
////    NSDate *localeData = [self.data dateByAddingTimeInterval:interval];
////    NSLog(@"1111111111%@", localeData);
//    
//    ////////时间
//    NSString * timeStampString = @"1446694927234";
//    NSTimeInterval _interval=[[timeStampString substringToIndex:10] doubleValue];
//    NSDate *date1 = [NSDate dateWithTimeIntervalSince1970:_interval];
//    NSLog(@"%@", date1);
//
//    
//    NSString *stdisgner = [NSString stringWithFormat:@"imgHD=2&key=7293a94299d71407052f08d29116a4a6&myId=752430&page=1&size=20&t=1447202813889&total=0&userId=%@&userid=752430", self.strId];
//    NSString *str = @"http://api.xiangqu.com/ouer/myshare";
//    NSURL *url = [NSURL URLWithString:str];
//    NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:url];
//    [request setHTTPMethod:@"POST"];
//    NSString *bodyStr = stdisgner;
//    NSData *bodyData = [bodyStr dataUsingEncoding:NSUTF8StringEncoding];
//    [request setHTTPBody:bodyData];
//    [NSURLConnection sendAsynchronousRequest:request queue:[NSOperationQueue mainQueue] completionHandler:^(NSURLResponse *response, NSData *data, NSError *connectionError) {
//        NSDictionary *dic = [NSJSONSerialization JSONObjectWithData:data options:0 error:nil];
////        NSLog(@"%@", dic);
////        NSLog(@"%@", self.strId);
//        [self.phoneImage sd_setImageWithURL:[NSURL URLWithString:dic[@"data"][@"avaPath"]]];
//        self.funsLabel.text = [NSString stringWithFormat:@"粉丝 %@", dic[@"data"][@"fansNum"]];
//        self.underLabel.text = dic[@"data"][@"description"];
//        self.seeLabel.text = [NSString stringWithFormat:@"关注 %@" , dic[@"data"][@"attentionNum"]];
//        
//        self.arr = [NSMutableArray array];
//        self.arr = [CLdisgnerPeople baseModelByArr:dic[@"data"][@"shares"]];
//        
//        
//        [self.myTableView reloadData];
////
//    }];
//}



//- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
//    return self.arr.count;
//}
//
//- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
//    static NSString *reuse = @"reuse";
//    CLpeopleTableCell *cell = [tableView dequeueReusableCellWithIdentifier:reuse];
//    if (!cell) {
//        cell = [[CLpeopleTableCell alloc] initWithStyle:UITableViewCellStyleSubtitle reuseIdentifier:reuse];
//        
//    }
//    
//    cell.titleLabel.numberOfLines = 0;
//    cell.titleLabel.font = [UIFont systemFontOfSize:18];
//    
//    CLdisgnerPeople *pepl = self.arr[indexPath.row];
//    cell.titleLabel.text = pepl.title;
//    [cell.picImage sd_setImageWithURL:[NSURL URLWithString:pepl.imgPath]];
//    
//    
//    return cell;
//}
//
////  根据ID判断是否为商品 或者是图片
//- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
//    CLdisgnerPeople *dis = self.arr[indexPath.row];
//    NSInteger count = 0;
//    NSInteger num = [dis.proId integerValue];
//    while (!num == 0) {
//        num /= 10;
//        count++;
//    }
////    NSLog(@"%ld", count);
////    NSLog(@"%@", dis.proId);
//    if (count == 7) {
//        CLinterViewController *intVC = [[CLinterViewController alloc] init];
//        [self.navigationController pushViewController:intVC animated:YES];
//        
//        NSString *str = [NSString stringWithFormat:@"%@", dis.proId];
//        intVC.interId = str;
//    }
//    else {
//        UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"不是商品" message:@"只是图片" delegate:nil cancelButtonTitle:@"确定" otherButtonTitles:@"取消", nil];
//                [alert show];
//    }
//}
//
//- (void)viewWillAppear:(BOOL)animated {
//    
//    self.tabBarController.tabBar.hidden = YES;
//    
//}
//
//- (void)viewWillDisappear:(BOOL)animated {
//    self.tabBarController.tabBar.hidden = NO;
//}







- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
